def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)

num = int(input("请输入一个整数："))
result = factorial(num)
print("{} 的阶乘是 {}".format(num, result))
